class Cat:
    def __init__(self):
        self.name=''
    def eat(self):
        print(f'{self.name}吃鱼')
    def drink(self):
        print(f'{self.name}喝水')
tom=Cat()
tom.name ='tom'
tom.eat()
tom.drink()